<% @title = t('sign_in') %>

<% if Gemcutter::ENABLE_DEVELOPMENT_LOG_IN %>
<div class="t-body">
  <h2 class="page__subheading--block">Development Login</h2>
  <ul>
    <% User.all.order(id: :asc).each do |user| %>
    <li>
      <%= link_to "login as #{user.handle}", controller: :sessions, action: "development_log_in_as", user_id: user.id %>
    </li>
    <% end %>
  </ul>
  <hr/>
</div>
<% end %>

<div class="t-body">
  <p>
    <%= link_to t('.forgot_password'), new_password_path, class: 't-list__item' %>
    <%= link_to t('.resend_confirmation'), new_email_confirmations_path, class: 't-list__item' %>
  </p>
</div>

<%= form_for :session, :url => session_path do |form| %>
  <div class="text_field">
    <%= form.label :who, t('activerecord.attributes.session.who'), :class => 'form__label' %>
    <%= form.text_field :who, :autofocus => true, :class => 'form__input' %>
  </div>
  <div class="password_field">
    <%= form.label :password, t('activerecord.attributes.session.password'), :class => 'form__label' %>
    <%= form.password_field :password, autocomplete: 'current-password', class: 'form__input' %>
  </div>
  <div class="form_bottom">
    <%= form.submit t('sign_in'), :data => {:disable_with => t('form_disable_with')}, :class => 'form__submit' %>
  </div>
<% end %>

<%= render "multifactor_auths/webauthn_prompt" %>
